<?php
	include_once("../include/init.php");
	include_once("admin_init.php");
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>主体部分</title>
<base target="_self">
<link rel="stylesheet" type="text/css" href="skin/css/base.css" />
<link rel="stylesheet" type="text/css" href="skin/css/main.css" />
</head>
<body leftmargin="8" topmargin='8'>
<table width="98%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px;margin-top:8px;">
  <tr>
    <td background="skin/images/frame/wbg.gif" bgcolor="#EEF4EA" class='title' colspan="2"><span><img src='skin/images/frame/arr3.gif' style='margin-right:10px;'>添加配置</span></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>
    	<form action="sys_conf.php" method="post" enctype="multipart/form-data" id="form-cate-add">
		<table style="margin-bottom:8px;margin-top:8px;margin-left:20px;">
			<tr>
				<td>配置项说明:</td>
				<td><input type="text" name="info" id="info" value="" /></td>
			</tr>
			<tr>
				<td>变量名称:</td>
				<td><input type="text" name="varname" id="varname" value="" /></td>
			</tr>
			<tr>
				<td>变量值:</td>
				<td><input type="text" name="value" id="value" value="" /></td>
			</tr>			
			   <tr>
			   		<input type="hidden" name="act" value="add" />
				 <td colspan="2" align="center" height="40px"><input type="submit" name="sub" value=" 添加 " class="coolbt2"></td>
			   </tr>
		</table>
	</form>
	</td>
  </tr>
</table>
</body>
</html>
<script>
	$('form-cate-add').onsubmit =function(){
		var msg ="";
		var info =$('info').value;
		if(info ==''){
			msg = '配置项说明不能为空';
		}
		var varname = $('varname').value;
		if(varname ==''){
			msg = '变量名称不能为空';
		}
		if(msg ==''){
			return true;
		}else{
			alert(msg);
			return false;
		}
	}
</script>